package com.jielin.handling.service.mobileapp.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.jielin.handling.entity.mobileapp.FeedBack;
import com.jielin.handling.mapper.mobileapp.FeedBackMapper;
import com.jielin.handling.service.mobileapp.FeedBackService;
import com.jielin.handling.util.StringUtil;

import lombok.extern.slf4j.Slf4j;

@Service
@Slf4j
public class FeedBackServiceImpl implements FeedBackService {
	@Autowired
	FeedBackMapper feedBackMapper;

	@Override
	public int addFeedBack(FeedBack feedBack) {
		if (feedBack == null) {
			return -1;
		}
		feedBack.setId(StringUtil.generatorUUID());
		log.info("添加意见反馈：" + JSONObject.toJSONString(feedBack));
		return feedBackMapper.addFeedBack(feedBack);
	}

}
